package cn.net.cfss.fgbp.face.console.controller;

import cn.hutool.json.JSONObject;
import cn.net.cfss.fgbp.api.console.constant.*;
import cn.net.cfss.fgbp.base.controller.BaseController;
import cn.net.cfss.fgbp.face.console.util.ReturnUtil;
import com.alibaba.fastjson.JSONArray;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author oygq
 * @title: SysConsoleController
 * @description: TODO
 * @date 2019/5/9 15:40
 */
@RestController
@Slf4j
@RequestMapping("console")
public class SysConsoleController extends BaseController {

    @ApiOperation("控制台获取枚举类信息")
    @RequestMapping(value = "/getEnums", method = RequestMethod.POST)
    public String getEnums(){
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("MenuType", MenuTypeEnum.getEnum());
        jsonObject.put("RoleDsType", RoleDsTypeEnum.getEnum());
        jsonObject.put("UserStatus", UserStatusEnum.getEnum());
        jsonObject.put("InternalStaff", YesOrNoEnum.getEnum());
        jsonObject.put("MenuFlag", MenuFlagEnum.getEnum());
        jsonObject.put("IsReviewAudit", IsReviewAuditEnum.getEnum());

        jsonObject.put("OrgTypeEnum", OrgTypeEnum.getEnum());
        jsonObject.put("IsReviewAuditEnum", IsLeafNodeEnum.getEnum());
        return ReturnUtil.returnSucc(jsonObject);
    }

}
